<form action="{:U()}" method="post" class="layui-form layui-box layui-form-pane"
<if condition="!$info">data-option="{callback:reloadTable}"</if>
ajaxSubmit>

<icy8:formItem label="名称" help="用于C函数调用，只能使用英文且不能重复">
    <input name="name" class="layui-input" placeholder="配置名称" value="{$info.name}"/>
</icy8:formItem>

<icy8:formItem label="标题" help="用于后台显示的配置标题">
    <input name="title" class="layui-input" placeholder="配置标题" value="{$info.title}"/>
</icy8:formItem>

<icy8:formItem label="排序" help="用于分组显示的顺序，系统按倒序显示">
    <input type="number" name="sort" class="layui-input" placeholder="配置排序" value="{$info.sort|default='99'}"/>
</icy8:formItem>

<icy8:formItem label="类型" help="系统会根据不同类型解析配置值">
    <select name="type">
        <volist name=":C('CONFIG_TYPE_LIST')" id="vo">
            <option value="{$key}"
            <eq name="info.type" value="$key">selected</eq>>{$vo}</option>
        </volist>
    </select>
</icy8:formItem>

<icy8:formItem label="分组" help="配置分组 用于批量设置 不分组则不会显示在系统设置中">
    <Html:select name="group" options="groups" selected="info['group']"/>
</icy8:formItem>

<icy8:formItem label="配置值" item-class="layui-form-text">
    <textarea name="value" placeholder="配置值" class="layui-textarea">{$info.value}</textarea>
</icy8:formItem>

<icy8:formItem label="配置项" help="如果是枚举型 需要配置该项" item-class="layui-form-text">
    <textarea name="extra" placeholder="配置项" class="layui-textarea">{$info.extra}</textarea>
</icy8:formItem>

<icy8:formItem label="说明" help="配置详细说明" item-class="layui-form-text">
    <textarea name="remark" placeholder="配置说明" class="layui-textarea">{$info.remark}</textarea>
</icy8:formItem>

<icy8:formItem label="">
    <if condition="$info">
        <input type="hidden" name="id" value="{$info.id}"/>
    </if>
    <icy8:button title="保存"/>
    <icy8:button title="取消" click="ICY8.closeThisDialog(this)" btnType="primary" type="button"/>
</icy8:formItem>
</form>
<script type="text/javascript">
    function reloadTable(data) {
        if (data.status == 1) {
            setTimeout(function () {
                layui.layer.closeAll();
                layui.table.reload('dataTable');
            }, 1600);
        }
    }
</script>